<template>
  <div class="classwatch">
    <el-form  label-width="100px" :model="formLabelAlign" style="max-width: 460px">
      <el-form-item label="品类ID">
        <el-input v-model="formLabelAlign.id" />
      </el-form-item>
      <el-form-item label="品类名称">
        <el-input v-model="formLabelAlign.name" />
      </el-form-item>
      <el-form-item label="创建日期">
        <el-input v-model="formLabelAlign.date" />
      </el-form-item>
      <el-form-item label="子品类">
        <el-input v-model="formLabelAlign.sonName" />
      </el-form-item>

      <el-button type="primary" class="btn" @click="$router.go(-1)">返回</el-button>
    </el-form>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'
//实例化路由管理对象
var $router = useRouter();

import {useRoute} from 'vue-router'
// 实例化路由对象(包含当前路由的详细信息)
var $route = useRoute();

import {onMounted,ref} from 'vue'
var formLabelAlign = ref({})

// console.log("搜索",JSON.parse($route.query))
onMounted(() => {
  formLabelAlign.value = JSON.parse($route.query.id)
})



</script>

<style>
.el-main>.classwatch{
  width: 100%;
  height: 340px;
  /* background-color: #f2f2f2; */
  margin: 0 auto;
}
.el-main>.classwatch>.el-form{
  padding: 50px;
}
.el-main>.classwatch>.el-form>.btn{
  margin-left: 200px;
}
</style>